import { Col, Row } from 'antd'
import React from 'react'
import './index.scss'
const style = { background: '#fff', padding: '8px 0' }


export function List(array = [], data = {}) {
    // console.log(obj);

    const dataList = array.map(item => {
        let newDataList = []
        for (const key in data) {
            if (item.key === key) {
                newDataList = <Col className="gutter-row" span={18} style={style}>{data[key]}</Col>
            }
        }
        return (<Row key={item.id} className='pre_row'>
            <Col className="gutter-row preright" span={6} style={style}>{item.title}</Col>
            {newDataList}
        </Row>)
    })

    return dataList
}
